package Form::FamilyAttendence;
use strict;
use warnings;
use base qw(My::Form);

sub build_form {
    my ($self) = shift;

    #
    #        'id'               => { 'type' => 'serial',    'primary_key' => 1,   'not_null' => 1 },
    #        'name'             => { 'type' => 'varchar',   'length'      => 255, 'not_null' => 1 },
    #        'family_name'      => { 'type' => 'varchar',   'length'      => 255, 'not_null' => 1 },
    #        'gender'           => { 'type' => 'varchar',   'length'      => 1,   'not_null' => 1 },
    #        'birth_date'       => { 'type' => 'datetime' },
    #        'birth_country_id' => { 'type' => 'varchar',   'length'      => 2,   'not_null' => 1 },
    #        'created'          => { 'type' => 'timestamp', 'not_null'    => 1,   'default'  => 'now' },
    #        'modified'         => { 'type' => 'timestamp', 'not_null'    => 1,   'default'  => 'now' },
    my $family_attendence =
        Rose::HTML::Form::Field::PopUpMenu->new( name     => 'family_attendence',
                                                 label    => 'Family attending',
                                                 required => 1
        );
    $family_attendence->options( yes => 'Yes',
                                 no  => 'No' );
    my $spouse_attendence =
        Rose::HTML::Form::Field::PopUpMenu->new( name     => 'spouse_attendence',
                                                 label    => 'Spouse attending',
                                                 required => 0
        );
    $spouse_attendence->options( yes => 'Yes',
                                 no  => 'No' );
    my $children_attendence =
        Rose::HTML::Form::Field::PopUpMenu->new( name     => 'children_attendence',
                                                 label    => 'Children attending',
                                                 required => 0
        );
    $children_attendence->options( 0 => '0',
                                   1 => '1',
                                   2 => '2',
                                   3 => '3',
                                   4 => '4',
                                   5 => '5'
    );
    $self->add_fields( 'family_attendence'   => $family_attendence,
                       'spouse_attendence'   => $spouse_attendence,
                       'children_attendence' => $children_attendence,
    );
} ## end sub build_form
1;
